package com.bingxue.edu.management.system.model.resp;

import com.bingxue.edu.common.enums.CommonStatusEnum;
import com.bingxue.edu.common.enums.EmployeeTypeEnum;
import com.bingxue.edu.common.enums.GenderEnum;
import com.mybatisflex.annotation.RelationManyToOne;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 员工信息
 *
 * @author panbo
 * @since 2024/07/10 16:11
 */
@Data
@Schema(description = "员工信息")
public class EmployeeResp {

    @Schema(description = "id")
    private String id;

    @Schema(description = "组织id")
    private String orgId;

    @RelationManyToOne(selfField = "orgId", targetTable = "base_org", targetField = "id", valueField = "name")
    @Schema(description = "组织名称")
    private String orgName;

    @Schema(description = "员工编码")
    private String code;

    @Schema(description = "姓名")
    private String name;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "手机号")
    private String mobilePhone;

    @Schema(description = "性别")
    private GenderEnum gender;

    @Schema(description = "生日")
    private LocalDate birthdate;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "员工类型")
    private EmployeeTypeEnum type;

    @Schema(description = "状态")
    private CommonStatusEnum status;

    @Schema(description = "最后一次登录ip")
    private String lastLoginIp;

    @Schema(description = "最后一次登录时间")
    private LocalDateTime lastLoginTime;

    @Schema(description = "最后一次修改密码时间")
    private LocalDateTime lastPwdModifiedTime;

}
